<template>
  <div class="boss">
    <Top></Top>
    <Banner id="4"></Banner>
    <chamber></chamber>
    <div class="war">
      <div class="area-center">
        <!-- 头部区域 -->
        <head-page
          :title="`${$route.query.provincial}(${this.$route.query.i})`"
        >
        </head-page>
        <!-- 地区区域 -->
        <div class="area title-center m-t-10">请选择</div>

        <!-- 各商会的区域 -->

        <!-- 省会区域 -->
        <div class="bottom title-center m-t-10" v-if="list.length">
          <!-- 内容区域 -->
          <div
            class="right flex aic m-t-07"
            v-for="(item, index) in list"
            :key="index"
            @click="detail(item)"
          >
            <div class="yuan"></div>
            <div class="rows-1 chamber-type">
              {{ item.chambertypeName }}
            </div>
          </div>
        </div>
        <div v-else class="tac c999 m-t-20">暂无数据</div>
      </div>
    </div>
  </div>
</template>
  
  <script>
import Top from "@/components/Home/TopPage.vue";
import Banner from "@/components/Home/BannerView.vue";
import chamber from "@/components/Home/CommCe.vue";
import { selectCofcChamberType } from "@/api/chambe";
export default {
  data() {
    return {
      list: [],
      city: sessionStorage.getItem("province"),
    };
  },
  mounted() {
    // 获取商会类型
    // getChamberType({ chamberCity: this.$route.query.i }).then((res) => {
    // 	if (res.data.code == 200) {
    // 		this.list = res.data.data
    // 	}
    // }),
    //获取商会类型
    selectCofcChamberType("one").then((res) => {
      if (res.data.code == 200) {
        this.list = res.data.data;
      }
    });
  },
  methods: {
    detail(item) {
      this.$router.push({
        path: "/chambersix",
        query: {
          item: item.chambertypeName,
          city: this.$route.query.i,
          typeId: item.chambertypeId,
          citysub: sessionStorage.getItem("provincesub"),
          provincial: this.$route.query.provincial,
        },
      });
    },
  },
  components: {
    Top,
    Banner,
    chamber,
  },
};
</script>
  
  <style scoped>
.boss {
  width: 100%;
  /* min-height: 2.78rem; */
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 头标区域 */
.top h3 img {
  width: 0.24rem;
  margin-right: 0.05rem;
}
/* 地区区域 */
.area {
  height: 0.3rem;
  padding-left: 0.05rem;
  line-height: 0.3rem;
}
/* 版心区域 */
.center {
  width: 95%;
  margin-top: 0.05rem;
  border-radius: 0.1rem;
  background-color: white;
}
h3 {
  text-align: center;
}
/* 各商会区域 */

.small {
  width: 100%;
  height: 0.3rem;
  font-weight: 700;
}
.small {
  width: 100%;
  height: 0.2rem;
  margin-bottom: 0.07rem;
}
/* 原点区域 */
.left {
  width: 5.5%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 0.1rem;
}
.yuan {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: black;
}
.chamber-type {
  width: calc(100% - 0.3rem);
  padding-left: 0.05rem;
}
/* 内容区域 */
.right {
  width: 94%;
  height: 100%;
  padding: 0 0.05rem;
  padding-left: 0.05rem;
}
</style>